<xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:exslt="http://exslt.org/common" 
  exclude-result-prefixes="exslt">

  <xsl:template match="/">
    <p>
      <xsl:value-of select="system-property('xsl:vendor-url')" />
    </p>
    <p>
      This XSLT stylesheet is being executed using
      <xsl:choose>
        <xsl:when test="system-property('xsl:vendor') = 'Microsoft'">
          <xsl:text>Microsoft </xsl:text>
          <xsl:variable name="ms-version" select="system-property('exslt:version')"/>
          <xsl:choose>
            <xsl:when test="$ms-version = ''">XslTransform</xsl:when>
            <xsl:when test="starts-with($ms-version, 'v')">XslCompiledTransform</xsl:when>
            <xsl:otherwise>
              MSXML
              <xsl:value-of select="$ms-version" />
            </xsl:otherwise>
          </xsl:choose>
        </xsl:when>
        <xsl:otherwise>
          Unrecognized XSLT engine from
          '<xsl:value-of select="system-property('xsl:vendor')" />'
        </xsl:otherwise>
      </xsl:choose>
    </p>

    <xsl:if test="system-property('xsl:vendor') = 'Microsoft'">
      <xsl:value-of select="exslt:node-set($v)/a/d/@e" xmlns:exslt="urn:schemas-microsoft-com:xslt" />
    </xsl:if>
    <xsl:if test="not(system-property('xsl:vendor') = 'Microsoft')">
      <?import namespace="ms" urn="http://exslt.org/common" declareNamespace ?>
      <xsl:value-of select="exslt:node-set($v)/a/d/@e" />
    </xsl:if>
  </xsl:template>

  <xsl:variable name="v">
    <a b="cccc">
      <d e="ffff"/>
    </a>
  </xsl:variable>
</xsl:stylesheet>